package com.chinasofti.io;

import javax.imageio.stream.FileImageOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo05 {
    public static void main(String[] args) throws IOException {
        //读取文件  --  输入流  E:\\aaa\\唐诗三百首.txt
        FileInputStream fis = new FileInputStream("E:\\aaa\\唐诗三百首.txt");
        //写文件    --  输出流 java419\\唐诗三百首.txt
        FileOutputStream fos = new FileOutputStream("java419\\唐诗三百首.txt");

        int by;
        while((by = fis.read()) != -1){
            fos.write(by);
        }
        //释放资源
        fos.close();
        fis.close();
    }
}
